Add staged connection diagnosis for opaque dial failures#1114
Draft
rossnelson wants to merge 4 commits into
Draft
Add staged connection diagnosis for opaque dial failures#1114rossnelson wants to merge 4 commits into
rossnelson wants to merge 4 commits into
Conversation
Covers classifyGRPCError, connectSummary's grep-compatibility contract, and an end-to-end case where the failing address comes from a config profile (exercising the new cliext builder metadata).
- errors.Is(err, syscall.ECONNREFUSED) doesn't match Windows' WSAECONNREFUSED; fall back to matching the error message. - The plaintext test server closed with the client's ClientHello unread, sending an RST that on Windows discards the buffered HTTP response before the probe reads it; drain before closing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
Related to #224 and #851.
What changed?
This PR diagnoses opaque Temporal server dial failures in stages. Users see where a connection failed and get a concrete next step without changing the original command error.
After a dial fails, the CLI probes DNS, TCP, and TLS. These probes use the remaining command context with a separate three-second cap.
TEMPORAL_CLI_DISABLE_CONNECT_DIAGNOSISdisables them.The diagnostic error carries allowlisted semantic facts instead of raw arguments or construction-time color state. It preserves native errors through unwrapping.
A single parent terminal boundary builds controlled reports and redacts exact secret values known to the runtime. It performs one checked stderr write. Existing stdout, exit-status, and extension ownership remain intact.
Suggested commands use long flags with POSIX or PowerShell-safe quoting. Standalone Activity
NotFoundhandling proves a second structured error path.The scope stays internal. This PR does not add a JSON error schema, a public status taxonomy, or public connection provenance in
cliext.Checklist
Stability
-o json/-o jsonl) are treated as breaking changesDesign
temporal <noun> <verb>structure (e.g.temporal workflow start)--search-attribute, bad:--index-field)(Experimental)incommands.yamlHelp text (see style guide at the top of
commands.yaml)--namespace, not-n), one flag per lineYourXxxform (YourWorkflowId,YourNamespace)Behavior
Tests
SharedServerSuite)func TestXxx) where applicableManual tests
Setup
No manual setup was used.
Happy path
Not rerun manually. Automated verification passed:
Error case
Not rerun manually. Targeted connection and terminal tests passed.
The standalone
cliextmismatch predates this branch. It is outside the full-suite command above.Composition
Not rerun manually.
What to look at first
cliextprovenance.